<template>
  <aside>
    <Recom :border="border" :data="data"/>

    <div class="adv" v-if="adv.length > 0">
      <a v-if="adv[0].path" :href="adv[0].path" :title="adv[0].name" target="_blank">
        <img v-lazyload.cdn="adv[0].picturePath" :alt="adv[0].name">
      </a>

      <a v-else :title="adv[0].name" target="_blank">
        <img v-lazyload.cdn="adv[0].picturePath" :alt="adv[0].name">
      </a>
    </div>
  </aside>
</template>

<script>
  import axios from '~/plugins/axios'
  import Recom from '~/components/News/Recom.vue'

  export default {
    data () {
      return {

      }
    },
    props: {
      adv: {
        type: Array,
        'default' () {
          return []
        }
      },
      border: {
        type: Boolean,
        'default': false
      },

      data: {
        type: Array,
        'default' () {
          return []
        }
      }
    },

    mounted () {

    },

    methods: {

    },

    components: {
      Recom
    }
  }
</script>

<style lang="scss" type="text/scss" scoped>
  .adv {
    height: 170px;
    margin-top: 10px;
    text-align: center;

    img {
      max-height: 170px;

    }
  }
</style>
